package com.yanzhu.service.impl;

import com.yanzhu.service.MaterialService;
import com.yanzhu.service.mapper.MaterialMapper;
import com.yanzhu.service.model.Material;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 方炎柱
 * @Description:
 * @Date: Created in 20:09 2018/1/31
 * @Modified:
 */
@AllArgsConstructor
@Service
public class MaterialServiceImpl implements MaterialService {
    private MaterialMapper materialMapper;

    @Override
    public int insert(Material material) {
        return materialMapper.insert(material);
    }

    @Override
    public Material queryMaterialById(long id) {
        return materialMapper.queryMaterialById(id);
    }

    @Override
    public List<Material> queryMaterialListByTid(long tid) {
        return materialMapper.queryMaterialListByTid(tid);
    }

    @Override
    public int deletematerialByTid(long tid) {
        return materialMapper.deletematerialByTid(tid);
    }
}
